Auto-Sizing columns when exporting to Excel

Is there a convenient way to use the Excel column auto-sizing function from DXL for unknown data width export?

I know that one can send code to size a column in an open excel worksheet from DXL, but as far as I have seen, this is done with a fixed number. I would like to avoid having to calculate the appropriate length by checking every record written and just use the bulit-in function if that is possible.

Thanks,
DavidBrian - Wed Aug 10 16:23:14 EDT 2011

Re: Auto-Sizing columns when exporting to Excel
kbmurphy - Wed Aug 10 18:04:46 EDT 2011

The excel function for this is <Range>.Autofit

I take it by the way you asked your question that you could code this in DXL.

Kevin

Re: Auto-Sizing columns when exporting to Excel
SystemAdmin - Mon Aug 15 18:13:42 EDT 2011

You can write a macro to do it in excel then have dxl call the macro.